﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PersonBlog.Common;

namespace PersonBlog.Extend
{
    public static class ExtendClass
    {
        public static string ToCNWeek(this DateTime dt)
        {
            string enWeek = dt.DayOfWeek.ToString();
            return TimeParser.WeekChange(enWeek);
        }

        public static int ToDaysFromNow(this DateTime dt)
        {
            TimeSpan ts = dt - DateTime.Now;
            return Convert.ToInt32(Math.Ceiling(ts.TotalDays));
        }
        
    }

    
}
